/*
 * Copyright (c) 2025 Industrial Software Feature Database
 */
package com.comac.ins.isfd.mapper;

import com.comac.ins.common.mybatis.core.mapper.BaseMapperPlus;
import com.comac.ins.isfd.domain.IsfdBusinessDatabaseRef;
import com.comac.ins.isfd.domain.vo.IsfdBusinessDatabaseRefVo;
import com.comac.ins.isfd.domain.vo.IsfdBusinessDatabaseRefWithNameVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
 * 数据资产-业务数据库Mapper接口
 *
 * @author hxloongs
 * @date 2025-03-03
 */
@Mapper
public interface IsfdBusinessDatabaseRefMapper extends BaseMapperPlus<IsfdBusinessDatabaseRef, IsfdBusinessDatabaseRefVo> {

    List<IsfdBusinessDatabaseRefVo> selectDataBaseRefByCondition(@Param("businessScenariosIds") List<Long> businessScenariosIds,
                                                                 @Param("businessSystemsIds") List<Long> businessSystemsIds,
                                                                 @Param("modelIds") List<Long> modelIds,
                                                                 @Param("dataBaseTypeIds") List<Long> dataBaseTypeIds);

    List<IsfdBusinessDatabaseRefWithNameVo> getAllDataWithNames(@Param("businessScenariosIds") List<Long> businessScenariosIds,
                                                                @Param("businessSystemsIds") List<Long> businessSystemsIds,
                                                                @Param("modelIds") List<Long> modelIds,
                                                                @Param("dataBaseTypeIds") List<Long> dataBaseTypeIds);

    List<IsfdBusinessDatabaseRefWithNameVo> getAllVersionDataWithNames(@Param("businessScenariosIds") List<Long> businessScenariosIds,
                                                                @Param("businessSystemsIds") List<Long> businessSystemsIds,
                                                                @Param("modelIds") List<Long> modelIds,
                                                                @Param("dataBaseTypeIds") List<Long> dataBaseTypeIds);


    List<IsfdBusinessDatabaseRefWithNameVo> getLastVersionDataWithNames(@Param("businessScenariosIds") List<Long> businessScenariosIds,
                                                                               @Param("businessSystemsIds") List<Long> businessSystemsIds,
                                                                               @Param("modelIds") List<Long> modelIds,
                                                                               @Param("dataBaseTypeIds") List<Long> dataBaseTypeIds);

    IsfdBusinessDatabaseRefVo selectDataBymodelId(@Param("modelId") Long modelId);

    List<IsfdBusinessDatabaseRefVo> selectDataBaseRefWithOutSystemName(@Param("businessScenariosIds") List<Long> businessScenariosIds,
                                                                 @Param("businessSystemsIds") List<Long> businessSystemsIds,
                                                                 @Param("modelIds") List<Long> modelIds,
                                                                 @Param("dataBaseTypeIds") List<Long> dataBaseTypeIds);

}
